Page({
    data:{
        title:"渡",
        time:"2017-11-28",
        singer:"薛之谦",
        url:"http://p1.music.126.net/fNbj5uDwltSDLbETdnEYYQ==/109951163069265719.jpg?param=177y177",
        list:[
            {
                id:468517654,
                videoSrc:"http://link.hhtjim.com/163/468517654.mp3",
                songname:"动物世界",
                name:"薛之谦",
            },
            {
                id:471385043,
                videoSrc:"http://link.hhtjim.com/163/471385043.mp3",
                songname:"暧昧",
                name:"薛之谦",
            },
            {
                id:516657051,
                videoSrc:"http://link.hhtjim.com/163/516657051.mp3",
                songname:"像风一样",
                name:"薛之谦",
            },
            {
                id:466122271,
                videoSrc:"http://link.hhtjim.com/163/466122271.mp3",
                songname:"高尚",
                name:"薛之谦",
            },
            {
                id:518894283,
                videoSrc:"http://link.hhtjim.com/163/518894283.mp3",
                songname:"骆驼",
                name:"薛之谦",
            },
            {
                id:515803379,
                videoSrc:"http://link.hhtjim.com/163/515803379.mp3",
                songname:"别",
                name:"薛之谦",
            },
            {
                id:443277013,
                videoSrc:"http://link.hhtjim.com/163/443277013.mp3",
                songname:"火星人来过",
                name:"薛之谦",
            },
            {
                id:520458481,
                videoSrc:"http://link.hhtjim.com/163/520458481.mp3",
                songname:"背过手",
                name:"薛之谦",
            },
            {
                id:517571371,
                videoSrc:"http://link.hhtjim.com/163/517571371.mp3",
                songname:"渡",
                name:"薛之谦",
            },
            {
                id:474567044,
                videoSrc:"http://link.hhtjim.com/163/474567044.mp3",
                songname:"我害怕",
                name:"薛之谦",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        const { id, videoSrc,songname,name } = item; // 从数据项中解构出
        const { list,url }=this.data
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&videoSrc=${encodeURIComponent(videoSrc)}&songname=${songname}&name=${name}&url=${encodeURIComponent(url)}&list=${encodeURIComponent(JSON.stringify(list))}`,
          });
    }
})